home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 December / Dec99.iso / Data / Main.dxr / 00178_RETURN searcher.ls < prev    next >
Encoding:
Text File  |  1999-10-05  |  1.5 KB  |  57 lines

  1. global gDB_Table1
  2.  
  3. on new me
  4.   return me
  5. end
  6.  
  7. on keyDown me
  8.   if the key <> RETURN then
  9.     pass()
  10.   else
  11.     mSetCriteria(gDB_Table1, "Title", "=", EMPTY)
  12.     t = the text of field "S Title"
  13.     if t <> EMPTY then
  14.       mSetCriteria(gDB_Table1, "or", "Title", "contains", t)
  15.     end if
  16.     t = the text of field "S Version"
  17.     if t <> EMPTY then
  18.       mSetCriteria(gDB_Table1, "or", "Version", "contains", t)
  19.     end if
  20.     t = the text of field "S Author"
  21.     if t <> EMPTY then
  22.       mSetCriteria(gDB_Table1, "or", "Author", "contains", t)
  23.     end if
  24.     t = the text of field "S Type"
  25.     if t <> EMPTY then
  26.       mSetCriteria(gDB_Table1, "or", "Type", "contains", t)
  27.     end if
  28.     t = the text of field "S Category"
  29.     if t <> EMPTY then
  30.       mSetCriteria(gDB_Table1, "or", "Category", "contains", t)
  31.     end if
  32.     t = the text of field "S Email"
  33.     if t <> EMPTY then
  34.       mSetCriteria(gDB_Table1, "or", "Email", "contains", t)
  35.     end if
  36.     t = the text of field "S URL"
  37.     if t <> EMPTY then
  38.       mSetCriteria(gDB_Table1, "or", "URL", "contains", t)
  39.     end if
  40.     t = the text of field "S Price"
  41.     if t <> EMPTY then
  42.       mSetCriteria(gDB_Table1, "or", "Price", "contains", t)
  43.     end if
  44.     t = the text of field "S Description"
  45.     if t <> EMPTY then
  46.       mSetCriteria(gDB_Table1, "or", "Description", "contains", t)
  47.     end if
  48.     mSelect(gDB_Table1)
  49.     if mSelectCount(gDB_Table1) = 0 then
  50.       alert("No products with those criteria found.")
  51.     else
  52.       showProdInfo(1)
  53.       go("Shareware")
  54.     end if
  55.   end if
  56. end
  57.